<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateMovimentoTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateMovimentoLabel_idMovimento}" for="idMovimento" />
                    <h:inputText id="idMovimento" value="#{movimentoController.selected.idMovimento}" title="#{bundle.CreateMovimentoTitle_idMovimento}" required="true" requiredMessage="#{bundle.CreateMovimentoRequiredMessage_idMovimento}"/>
                    <h:outputLabel value="#{bundle.CreateMovimentoLabel_tipo}" for="tipo" />
                    <h:inputText id="tipo" value="#{movimentoController.selected.tipo}" title="#{bundle.CreateMovimentoTitle_tipo}" required="true" requiredMessage="#{bundle.CreateMovimentoRequiredMessage_tipo}"/>
                    <h:outputLabel value="#{bundle.CreateMovimentoLabel_agencia}" for="agencia" />
                    <h:inputText id="agencia" value="#{movimentoController.selected.agencia}" title="#{bundle.CreateMovimentoTitle_agencia}" required="true" requiredMessage="#{bundle.CreateMovimentoRequiredMessage_agencia}"/>
                    <h:outputLabel value="#{bundle.CreateMovimentoLabel_desconto}" for="desconto" />
                    <h:inputText id="desconto" value="#{movimentoController.selected.desconto}" title="#{bundle.CreateMovimentoTitle_desconto}" required="true" requiredMessage="#{bundle.CreateMovimentoRequiredMessage_desconto}"/>
                    <h:outputLabel value="#{bundle.CreateMovimentoLabel_numDocumento}" for="numDocumento" />
                    <h:inputText id="numDocumento" value="#{movimentoController.selected.numDocumento}" title="#{bundle.CreateMovimentoTitle_numDocumento}" />
                    <h:outputLabel value="#{bundle.CreateMovimentoLabel_documento}" for="documento" />
                    <h:inputText id="documento" value="#{movimentoController.selected.documento}" title="#{bundle.CreateMovimentoTitle_documento}" />
                    <h:outputLabel value="#{bundle.CreateMovimentoLabel_fkLancamento}" for="fkLancamento" />
                    <h:selectOneMenu id="fkLancamento" value="#{movimentoController.selected.fkLancamento}" title="#{bundle.CreateMovimentoTitle_fkLancamento}" required="true" requiredMessage="#{bundle.CreateMovimentoRequiredMessage_fkLancamento}">
                        <f:selectItems value="#{lancamentosController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateMovimentoLabel_data}" for="data" />
                    <h:inputText id="data" value="#{movimentoController.selected.data}" title="#{bundle.CreateMovimentoTitle_data}" required="true" requiredMessage="#{bundle.CreateMovimentoRequiredMessage_data}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{movimentoController.create}" value="#{bundle.CreateMovimentoSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{movimentoController.prepareList}" value="#{bundle.CreateMovimentoShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateMovimentoIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
